package com.smarthome.ipc.util;

import java.io.IOException;
import java.util.Properties;

/**
 * 读取IPC配置文件
 * @author Administrator
 *
 */
public class IpcConfig {
	/**本机外网地址*/
	public static String LOCAL_NET_IP = "";
	/**API服务器IP地址*/
	public static final String CENTER_SEVER_IP = "center.sever.ip"; 
	/**获取IP*/
	public static final String SEVER_GETIP="/ipc/getIp";
	/**更新IP*/
	public static final String SEVER_RECORD_IP="/ipc/recordIp";
	public IpcConfig(){}
	
	private static Properties props = new Properties();
	
	static{
		try {
			props.load(Thread.currentThread().getContextClassLoader().getResourceAsStream("conf/ipc-config.properties"));
		} catch (IOException e) {
			e.printStackTrace();
		}
	}
	
	public static String getValue(String key){
		return props.getProperty(key);
	}
	
}
